<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>


<script src="../js/vue.js"></script>
<div id="app">
  <!--这边属性不支持驼峰，需要用-连接-->
  <cpn :c-info="info"></cpn>

</div>

<template id="cpn" >
  <div>
    <h2>{{cInfo}}</h2>
  </div>
</template>
<script>
  const obj={
    template:`#cpn`,
    props:{
      cInfo:{
        type:Object,
        default() {
          return {};
        }
      }
    },
    data(){
      return{}
    },
    methods:{}

  }
  const app = new Vue({
    el: '#app',
    data: {
      info:{
        name:'zhu',
        age:18,
        height:1.88
      }
    },
    components:{
      cpn:obj
    }
  })
</script>
</body>
</html>